<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title></title>
  <script src="../vue.js"></script>
</head>
<body>
  <div id="root">
    <h1>parent</h1>
    <div>{{title}}</div>
    <child :message.sync="title" :age="age" :class="title"></child>
  </div>
  <script type="module">
    Vue.config.productionTip = false
    import child from './child.js'

    var vm = new Vue({
      el: '#root',
      data: {
        title: 'hello',
        age: ['abc']
      },
      components: {
        child
      },
      methods: {
        // handleMessage(obj) {
        //   this.title = obj.x
        // }
      },
      mounted() {
        setTimeout(() => {
          // this.age = 20
          // this.age.push('def')
        }, 2000)
      },
    })
  </script>
</body>
</html>